package com.ugoodtech.mdcc.web.dto;

import com.ugoodtech.mdcc.core.domain.StationLeanPaintSatisfactionReport.OperationalDataAnalysis;
import com.ugoodtech.mdcc.core.domain.StationLeanPaintSatisfactionReport.OperationalDataAnalysisTemp;
import io.swagger.annotations.ApiModelProperty;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class KpiDataResponse {

    private static final Logger logger = LoggerFactory.getLogger(KpiDataResponse.class);

    @ApiModelProperty("数据库ID")
    private Long id;

    @ApiModelProperty("报告ID")
    private Long reportId = 0L;

    @ApiModelProperty("维修站ID")
    private Long stationId = 0L;

    @ApiModelProperty("月喷漆产值")
    private String sprayPaintOfMonth = "";

    @ApiModelProperty("喷漆维修台次")
    private String sprayPaintOfNum = "";

    @ApiModelProperty("车间喷漆工人数")
    private String sprayPaintOfPersonNum = "";

    @ApiModelProperty("车间喷涂工位数（不含烤房）")
    private String prayPaintOfStationNum = "";

    @ApiModelProperty("平均单面喷漆收费")
    private String prayPaintOfAverage = "";

    @ApiModelProperty("油漆采购额")
    private String paintMoney = "";

    @ApiModelProperty("月漆工工资")
    private String painterMoneyOfMonth = "";

    @ApiModelProperty("烤房数量")
    private String brankStationNum = "";

    @ApiModelProperty("返工台次")
    private String reworkNum = "";

    @ApiModelProperty("下标-用于判断改善月")
    private Integer indexId = 0;

    public KpiDataResponse() {
    }

    public KpiDataResponse(OperationalDataAnalysis data) {
        this.reportId = data.getReportId();
        this.stationId = data.getStationId();
        if (data.getId() != null) {
            this.id = data.getId();
        }
        if (data.getSprayPaintOfMonth() != null) {
            this.sprayPaintOfMonth = data.getSprayPaintOfMonth();
        }
        if (data.getSprayPaintOfNum() != null) {
            this.sprayPaintOfNum = data.getSprayPaintOfNum();
        }
        if (data.getSprayPaintOfPersonNum() != null) {
            this.sprayPaintOfPersonNum = data.getSprayPaintOfPersonNum();
        }
        if (data.getPrayPaintOfStationNum() != null) {
            this.prayPaintOfStationNum = data.getPrayPaintOfStationNum();
        }
        if (data.getPrayPaintOfAverage() != null) {
            this.prayPaintOfAverage = data.getPrayPaintOfAverage();
        }
        if (data.getPaintMoney() != null) {
            this.paintMoney = data.getPaintMoney();
        }
        if (data.getPainterMoneyOfMonth() != null) {
            this.painterMoneyOfMonth = data.getPainterMoneyOfMonth();
        }
        if (data.getBrankStationNum() != null) {
            this.brankStationNum = data.getBrankStationNum();
        }
        if (data.getReworkNum() != null) {
            this.reworkNum = data.getReworkNum();
        }
        if (data.getIndexId() != null) {
            this.indexId = data.getIndexId();
        }
    }

    private int i = 1;

    public KpiDataResponse(OperationalDataAnalysisTemp data) {
        this.reportId = data.getReportId();
        this.stationId = data.getStationId();
        if (data.getId() != null) {
            this.id = data.getId();
        }
        if (data.getSprayPaintOfMonth() != null) {
            this.sprayPaintOfMonth = data.getSprayPaintOfMonth();
        }
        if (data.getSprayPaintOfNum() != null) {
            this.sprayPaintOfNum = data.getSprayPaintOfNum();
        }
        if (data.getSprayPaintOfPersonNum() != null) {
            this.sprayPaintOfPersonNum = data.getSprayPaintOfPersonNum();
        }
        if (data.getPrayPaintOfStationNum() != null) {
            this.prayPaintOfStationNum = data.getPrayPaintOfStationNum();
        }
        if (data.getPrayPaintOfAverage() != null) {
            this.prayPaintOfAverage = data.getPrayPaintOfAverage();
        }
        if (data.getPaintMoney() != null) {
            this.paintMoney = data.getPaintMoney();
        }
        if (data.getPainterMoneyOfMonth() != null) {
            this.painterMoneyOfMonth = data.getPainterMoneyOfMonth();
        }
        if (data.getBrankStationNum() != null) {
            this.brankStationNum = data.getBrankStationNum();
        }
        if (data.getReworkNum() != null) {
            this.reworkNum = data.getReworkNum();
        }
        if (data.getIndexId() != null) {
            this.indexId = data.getIndexId();
        }
        logger.info("封装第" + i + "次");
    }


    public Long getReportId() {
        return reportId;
    }

    public void setReportId(Long reportId) {
        this.reportId = reportId;
    }

    public Long getStationId() {
        return stationId;
    }

    public void setStationId(Long stationId) {
        this.stationId = stationId;
    }

    public String getSprayPaintOfMonth() {
        return sprayPaintOfMonth;
    }

    public void setSprayPaintOfMonth(String sprayPaintOfMonth) {
        this.sprayPaintOfMonth = sprayPaintOfMonth;
    }

    public String getSprayPaintOfNum() {
        return sprayPaintOfNum;
    }

    public void setSprayPaintOfNum(String sprayPaintOfNum) {
        this.sprayPaintOfNum = sprayPaintOfNum;
    }

    public String getSprayPaintOfPersonNum() {
        return sprayPaintOfPersonNum;
    }

    public void setSprayPaintOfPersonNum(String sprayPaintOfPersonNum) {
        this.sprayPaintOfPersonNum = sprayPaintOfPersonNum;
    }

    public String getPrayPaintOfStationNum() {
        return prayPaintOfStationNum;
    }

    public void setPrayPaintOfStationNum(String prayPaintOfStationNum) {
        this.prayPaintOfStationNum = prayPaintOfStationNum;
    }

    public String getPrayPaintOfAverage() {
        return prayPaintOfAverage;
    }

    public void setPrayPaintOfAverage(String prayPaintOfAverage) {
        this.prayPaintOfAverage = prayPaintOfAverage;
    }

    public String getPaintMoney() {
        return paintMoney;
    }

    public void setPaintMoney(String paintMoney) {
        this.paintMoney = paintMoney;
    }

    public String getPainterMoneyOfMonth() {
        return painterMoneyOfMonth;
    }

    public void setPainterMoneyOfMonth(String painterMoneyOfMonth) {
        this.painterMoneyOfMonth = painterMoneyOfMonth;
    }

    public String getBrankStationNum() {
        return brankStationNum;
    }

    public void setBrankStationNum(String brankStationNum) {
        this.brankStationNum = brankStationNum;
    }

    public String getReworkNum() {
        return reworkNum;
    }

    public void setReworkNum(String reworkNum) {
        this.reworkNum = reworkNum;
    }

    public Integer getIndexId() {
        return indexId;
    }

    public void setIndexId(Integer indexId) {
        this.indexId = indexId;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
}
